<script type="text/javascript" src="<?=BASE_URL();?>java_scripts/vote_scripts.js"></script>

<?php 
	$desc=(!isset($item_desc))?"":$item_desc;
	$error_msg=(!isset($error))?"":$error;
?>
	<h3 class="capture">Vote Management</h3>
    <div id="wrap">
    
    <div id="tdd_selected">
    	<div class="dd_selected">Add New - Vote Item</div>
        <div class="dd_view">
        
	      	<form action="" method="post">
	      		<table border="0" cellpadding="0" cellspacing="0" width="80%">
	      			<tr align="center">
	      				<td height="55" align="right">Item Name :&nbsp;&nbsp;&nbsp;</td>
	      				<td align="left"><input type="text" value="<?=$desc?>" name="txtitem" id="txtitem" maxlength="255" style="width: 250px;" /><div id='existing'><?=$error_msg?></div></td>
	      			</tr>
	      			<tr align="center">
	      				<td height="25" align="right">Category :&nbsp;&nbsp;&nbsp;</td>
	      				<td align="left">
	      				<select name="txtcat" id="txtcat">
	      					<?php 
	      					foreach($categories->result_array() as $category){
	      					?>
	      					<option value="<?=$category['vote_item_cat_id']?>"><?=$category['vote_item_cat_desc']?></option>
	      					<?php 
	      						}
	      					?>
	      				</select>
	      				</td>
	      			</tr>
	      			<tr align="center">
	      				<td>&nbsp;</td>
	      				<td height="20" colspan="2" align="left"><br/><input type="button" class="button_back_end" onclick="javascript:window.location='<?=site_url("vote_management/voteItem")?>'" style="cursor: pointer;width:50px;" value="Back"/>&nbsp;&nbsp;<input type="button" class="button_back_end" onclick="javascript:addItem('<?=site_url("vote_management/addItem")?>')" style="cursor: pointer; width:50px;" value="Add"/></td>
	      			</tr>
	      		</table>
	      	</form>
</div>
</div>
</div>
